//package org.jeecg.modules.activiti.listener;
//
//import com.alibaba.fastjson.JSON;
//import org.activiti.engine.delegate.DelegateExecution;
//import org.activiti.engine.delegate.ExecutionListener;
//import org.jeecg.common.util.SpringContextUtils;
//import org.jeecg.modules.activiti.entity.ActBusiness;
//import org.jeecg.modules.activiti.service.Impl.ActBusinessServiceImpl;
//import org.jeecg.modules.zcgl.service.IAssetInfoService;
//import org.jeecg.modules.zcgl.vo.AssetInfoPage;
//import org.springframework.stereotype.Component;
//
///**
// * 资产变更表单审批后监听
// */
//@Component
//public class AssetModifyListener implements ExecutionListener {
//
//
//    ActBusinessServiceImpl actBusinessService;
//    private IAssetInfoService assetInfoService;
//
//    public void notify(DelegateExecution execution) throws Exception {
//        if (assetInfoService == null){
//            assetInfoService = (IAssetInfoService)SpringContextUtils.getBean("assetInfoServiceImpl");
//        }
//        if (actBusinessService == null){
//            actBusinessService = (ActBusinessServiceImpl) SpringContextUtils.getBean("actBusinessServiceImpl");
//        }
//
//        String eventName = execution.getEventName();
//        //start
//        if (EVENTNAME_START.equals(eventName)) {
//
//        } else if (EVENTNAME_END.equals(eventName)) {
//            ActBusiness actBusiness = actBusinessService.getById(execution.getProcessBusinessKey());
//            if (actBusiness != null && "zcgl_asset_info".equalsIgnoreCase(actBusiness.getTableName())){
//                AssetInfoPage page = JSON.parseObject(actBusiness.getData(), AssetInfoPage.class);
//                assetInfoService.updateMain(page, true);
//            }
//        }
////        System.out.println("----" + execution.getProcessBusinessKey() + "" + execution.getProcessDefinitionId());
//    }
//}
